package com.itheima.service;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class StudentAPP {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        Student student = (Student) applicationContext.getBean("factory1");
        student.exercise();
        Student student2 = (Student) applicationContext.getBean("factory2");
        student2.exercise();
    }
}
